﻿<%@ Page Language="C#" MasterPageFile="~/Front.Master" AutoEventWireup="true" CodeBehind="ManageUser.aspx.cs" Inherits="HRProject.User.ManageUser" Title="Untitled Page" %>
<%@ Import Namespace="HRProject.Code.DTO" %>
<%@ Import Namespace="HRProject.User" %>
<%@ Import Namespace="HRProject.Code.Common" %>
<asp:Content ID="Content1" ContentPlaceHolderID="IncludePlaceHolder" runat="server">
    <script type="text/javascript" language="javascript" src="/js/user.js"></script>
    <link type="text/css" href="/css/user.css" rel="Stylesheet"/>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="TitleIconPlaceHolder" runat="server">
    <img src="/image/layout/icon/UserIcon.png" alt="" />
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="TitleNamePlaceHolder" runat="server">
    <%= ContentProvider.GetString("ManageUser") %>
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="MainPanelPlaceHolder" runat="server">
    <p><%= ContentProvider.GetString("ManageUser") %></p>
    <input type="button" value="Tạo tài khoản mới" onclick="window.location.href = '/User/AddUser.aspx';" style="float:left"/>
    <br /><br />
    <div class="div-table">
        <div class="div-row div-col">
            <div class="div-header c3"><span><%= ContentProvider.GetString("UserName") %></span></div>
            <div class="div-header c4"><span><%= ContentProvider.GetString("Email") %></span></div>
            <!--
            <% foreach(BLAudit audit in AllAudits)
               {
                   %>
                   <div class="div-header c5"><span><%= audit.Name %></span></div>
                   <%
               } %>-->
        </div>
        <% foreach (UserObject u in AllUsers)
           { %>
        <div class="div-row">
            <div class="div-cell c3">
                <span class="edit" onclick="editUser(this);"></span>
                <span class="remove" onclick="removeUser(this);"></span>
                <div onclick="selectUser(this);"><%= u.user.UserName %></div>
                <input type="hidden" name="hdfUserId" value="<%= u.user.ProviderUserKey %>"/>
            </div>
            <div class="div-cell c4" onclick="selectUser(this);"><span><%= u.user.Email %></span></div>
        </div>
        <% } %>
    </div>
    <div id="divAudits" class="user">
        <div class="row">
            <div class="name-cell a1"></div>
            <div class="header a3"><%= ContentProvider.GetString("Audit") %></div>
        </div>
        <% foreach (BLAudit audit in AllAudits)
           { %>
        <div class="row">
            <div class="name-cell a2"><%= audit.Name %></div>
            <div class="cell">
            <% foreach (BLAuditMode mode in audit.Modes)
               { %>
               <input type="checkbox" name="ckb_<%= audit.Key %>" value="<%= mode.ModeKey %>"/><%= mode.ModeName %>
            <% } %>
            </div>
        </div>
        <% } %>
        <br />
        <input type="button" onclick="updateAudit();" value="Cập nhật"/>
    </div>
</asp:Content>
